<template>
        <div class="header">
            <!-- <h2 id="mnavh" :class="is_open" @click="show()"><span class="navicon"></span></h2> -->
            <el-row class="header-logo">
                <!-- <el-col class="logo"><span>— B E I —</span></el-col> -->
                <div class="logo"></div>
            </el-row>
            <el-menu :router=true :default-active="activeIndex" class="header-ul el-menu-demo" mode="horizontal" type="flex">
            <!-- <div class="open"><i class="el-icon-menu"></i>
                <nav id="nav-menu"> -->
                    <el-menu-item index="/"><i class="el-icon-s-home"></i>{{ $t("header.home")}}</el-menu-item>
                    <el-menu-item index="/category"><i class="iconfont icon-fenlan"></i>{{$t("header.category")}}</el-menu-item>
                    <!-- <el-menu-item index="/archives"><i class="iconfont icon-guidang"></i>{{$t("header.archives")}}</el-menu-item> -->
                    <el-menu-item index="/leavmess"><i class="iconfont icon-112"></i>{{$t("header.leavmess")}}</el-menu-item>
                    <el-submenu index="/mine">
                        <template slot="title"><i class="iconfont icon-mine"></i>宝藏</template>
                        <el-menu-item index="/mine-img"><i class="el-icon-picture"></i>图片</el-menu-item>
                        <el-menu-item index="/mine-video"><i class="iconfont icon-video"></i>视频</el-menu-item>
                        <el-menu-item index="/mine-no"><i class="iconfont icon-yinle"></i>音乐</el-menu-item>
                        <el-submenu index="/mine-it">
                        <template slot="title">其他</template>
                        <el-menu-item index="2-4-1">选项1</el-menu-item>
                        <el-menu-item index="2-4-2">选项2</el-menu-item>
                        <el-menu-item index="2-4-3">选项3</el-menu-item>
                        </el-submenu>
                    </el-submenu>
                    <el-menu-item index="/abouts"><i class="iconfont icon-geren"></i>{{$t("header.abouts")}}</el-menu-item>
                <!-- </nav></div> -->
            </el-menu>
        </div>
</template>
</script>
<script>
import $ from 'jquery';
export default {
    name: "Header",
    data() {
        return {
            activeIndex: '/',
        };
    },
    mounted() {
        var element = document.createElement("script");
        element.src = "https://at.alicdn.com/t/font_2229530_u2v7432gzsl.css";
        document.body.appendChild(element);
    }
}
</script>
<style scoped>
.header{
    display: flex; 
    width: 65%;
    /* justify-content: center; */
    height: auto;
    margin: 0 auto;
    /* background: #000; */
    margin-bottom: 50px;
}
.logo{
    background: url("../../assets/img/logo.png") no-repeat;
    background-size: 93x 40px;
    height: 40px;
    margin: 10px 0 0 0;
}
.open{
    width: 30px;
    height: 45px;
    /* margin: 0; */
}
.open .el-icon-menu{
    font-size: 24px;
    margin-right: 3px;
    color: #000;
    display: none;
    margin: 15px 0 0 20px;
}
.el-row{
    width: 18%;
    height: auto;
    margin: auto 0;
    text-align: left;
    /* justify-content: center; */
}
.el-col span{
    display: inline-block;
    font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif;
    position: relative;
    /* vertical-align: top; */
    font-size: 30px;
    font-weight: bolder;
}
nav{
    display: flex;
    outline: none;
}
.header-ul{
    width: 83%;
    border-bottom: none;
    display: flex;
    background-color: rgba(0, 0, 0, 0);
}
.el-menu-item{
    font-size: 14px;
    /* display: inline-block; */
    padding: 0 20px;
    /* height: auto; */
    height: 59px;
    line-height: 59px;
}
nav i{
    font-size: 18px;
    margin-right: 3px;
    /* font-weight:initial; */
}
#nav-menu >>> .el-submenu__title{
    padding: 0;
    height: 59px;
    line-height: 59px;
    font-size: 14px;
    padding: 0 20px;
}
.icon-video, .icon-yinle {
    margin: 0 7px 0 5px;
}
</style>